package com.jdcjk.project.main.view;

import android.app.DialogFragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.Button;

import com.jdcjk.R;

/**
 * Created by Administrator on 2016/12/28 0028.
 */
public class UnBindCarDialog extends DialogFragment {
    private final String TAG = BindCarDialog.class.getSimpleName();
    private View.OnClickListener onClickListener;

    public UnBindCarDialog() {

    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View viewContent = inflater.inflate(R.layout.dialog_unbind_car, container, false);
        //去掉dialog默认标题
        getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
        //确定按钮
        Button addCarDetermine_button = (Button) viewContent.findViewById(R.id.dialog_add_car_determine_btn);
        addCarDetermine_button.setOnClickListener(onClickListener);
        //取消按钮
        Button addCarCancle_button = (Button) viewContent.findViewById(R.id.dialog_add_car_cancle_btn);
        //取消按钮点击监听
        addCarCancle_button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                UnBindCarDialog.this.dismiss();
            }
        });
        return viewContent;
    }

    public void setOnClickListener(View.OnClickListener onClickListener) {
        this.onClickListener = onClickListener;
    }
}
